1. Field of the Invention
The present invention relates to a technique of compositing a physical space image with a virtual space image.
2. Description of the Related Art
There is conventionally proposed a mixed reality (MR) technique which superimposes a computer graphics (CG) on real scenery and presents the image to a user to make him/her feel as if the virtual objects were actually present in that scene.
To give the user a more realistic feeling by using the MR technique, simply superimposing a CG on real scenery does not suffice. It is also important to ensure interaction that allows the user to (have a bodily sensation to) actually touch or manipulate a virtual object rendered by CG. To implement the interaction, it is necessary to display, e.g., a user's hand (object) that manipulates a virtual object in front of (on the foreground of) the virtual object. This is because if the object that should be placed in front of the virtual object is hidden by the virtual object, the sense of distance to the virtual object or the sense of reality breaks down so no realistic feeling can be obtained.
To solve this problem, the present applicant has proposed, in patent reference 1, a technique of preventing a virtual object from hiding an object image that should be placed on the foreground. This technique acquires the real photo image of an object and background, and extracts, from the real photo image as an object region, “an object that should be displayed in front of a virtual object (a region having color information serving as object detection information)”, which has been registered in the system manually in advance. Virtual object rendering is inhibited in the object region. This technique enables the user to have a realistic MR experience because the object that should exist on the foreground is displayed in front of the virtual object without being hidden by it.
FIG. 1 is a view showing examples of a physical space image, a virtual space image, and a composition image obtained by superimposing the virtual space image on the physical space image.
Referring to FIG. 1, a physical space image 101 includes hand regions 150 as objects. A virtual space image 102 is superimposed on the physical space image 101. A composition image 103 is obtained by superimposing the virtual space image 102 on the physical space image 101. In generating the composition image 103, the virtual space image 102 is not superimposed on the hand regions 150 in the physical space image 101. As a result, the hand regions 150 are rendered without being processed.    [Patent reference 1] Japanese Patent Laid-Open No. 2003-296759
The mixed reality experience system disclosed in patent reference 1 excellently operates if the object observed by the user is of a single color. However, if the object has a plurality of different colors, some parts of the object are isolated in the CG because CG rendering can be inhibited only in a region having a predetermined color. This may impair the realistic feeling for the user.
FIG. 2 is a view showing examples of a physical space image including objects having a plurality of colors, a virtual space image, and a composition image obtained by superimposing the virtual space image on the physical space image.
Referring to FIG. 2, a physical space image 201 includes hand regions 150a and arm regions 150b as objects. The regions 150a and 150b have different colors. A virtual space image 202 is superimposed on the physical space image 201. A composition image 203 is obtained by superimposing the virtual space image 202 on the physical space image 201. In this case, only regions having the color of the hand regions 150a are excluded from the superimposition target of the virtual space image 202. For this reason, the virtual space image 202 is rendered in the arm regions 150b where superimposition of the virtual space image 202 should be inhibited, as shown in FIG. 2.
The above-described technical background brings the following demand. A user's hand or a designated region is extracted from a real photo image. Then, a region (e.g., user's arm) attached to the extracted region is also extracted. The virtual space image is superimposed on the physical space image except in an object region (hand and arm) defined by merging the extracted regions.